<?php
class ExpenditureType extends AppModel {
    var $name = 'ExpenditureType';
    var $primaryKey = 'expenditure_type_id';
    var $displayField = 'description';

    var $hasOne = array(
        'PeriodicExpenditureType'
    );

    var $belongsTo = array(
        'ExpenditureTypeSource' => array(
            'className' => 'LookupValue',
            'foreignKey' => 'expenditure_type_source',
            'conditions' => array('ExpenditureTypeSource.lookup_type' => 'EXPENDITURE_TYPE_SOURCE'),
            'order' => 'ExpenditureTypeSource.meaning'
        ),
        'ExpenditureTypePeriodicity' => array(
            'className' => 'LookupValue',
            'foreignKey' => 'expenditure_type_periodicity',
            'conditions' => array('ExpenditureTypePeriodicity.lookup_type' => 'EXPENDITURE_TYPE_PERIODICITY'),
            'order' => 'ExpenditureTypePeriodicity.meaning'
        )
    );

var $hasMany = array(
        'ExpenditureDistribution',
        'Expenditure'
    );
}
?>
